# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[self.player.choices.edited = True
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb77471ec>}
nname: 49
n 49(None)[return True
]:
	i: 15(), 34()
	o: 

nname: 34
n 34(None)[pygui_globs['menustack'].back_one_menu()
]:
	i: 0(f)
	o: 49()

nname: 15
n 15(None)[self.player.choices.edited = False
]:
	i: 0(t)
	o: 49()

nname: 0
n 0(self.player.choices.edited)[]:
	i: 
	o: 15(t), 34(f)

nname: 0
n 0(None)[if self.player.choices.edited:
	self.player.choices.edited = False
else:
	pygui_globs['menustack'].back_one_menu()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb774756c>}
nname: 0
n 0(None)[self.player.choices.edited = False
pygui_globs['menustack'].back_one_menu()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb774744c>}
nname: 0
n 0(None)[play = self.player
play.choices.edited = False
play.selected.vfs_delete()
del play.choices[play.selected_pos]
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb77474ac>}
nname: 0
n 0(None)[from pygui.window import ConfirmWindow
ConfirmWindow(_('Remove item(s) from playlist?'), confirm_action=self._do_delete).show()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb774768c>}
nname: 6
n 6(None)[def event_right(self, event):
	self.player.choices.edited = True
	return True

def event_left(self, event):
	if self.player.choices.edited:
		self.player.choices.edited = False
	else:
		pygui_globs['menustack'].back_one_menu()
	return True

def event_action_menu(self, event):
	self.player.choices.edited = False
	pygui_globs['menustack'].back_one_menu()
	return True

def _do_delete(self):
	play = self.player
	play.choices.edited = False
	play.selected.vfs_delete()
	del play.choices[play.selected_pos]
	return True

def event_stop(self, event):
	from pygui.window import ConfirmWindow
	ConfirmWindow(_('Remove item(s) from playlist?'), confirm_action=self._do_delete).show()
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb773fd0c>}
nname: 0
n 0(None)[return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb773fc6c>}
nname: 0
n 0(None)[return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb773fc0c>}
nname: 6
n 6(None)[__doc__ = "Event handler for the TV favorite editor. Toggling is more or less\n    messed up there, so it's disabled for the time being.\n\n    The Select button doesn't do anything here either.\n    "
def event_toggle_menu(self, event):
	return True

def event_select(self, event):
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb773fcac>}
nname: 0
n 0(None)[from __future__ import absolute_import
from .core import MenuEventHandler
from pygui.shared import pygui_globs
class PlaylistEditorEventHandler(MenuEventHandler):
	def event_right(self, event):
		self.player.choices.edited = True
		return True

	def event_left(self, event):
		if self.player.choices.edited:
			self.player.choices.edited = False
		else:
			pygui_globs['menustack'].back_one_menu()
		return True

	def event_action_menu(self, event):
		self.player.choices.edited = False
		pygui_globs['menustack'].back_one_menu()
		return True

	def _do_delete(self):
		play = self.player
		play.choices.edited = False
		play.selected.vfs_delete()
		del play.choices[play.selected_pos]
		return True

	def event_stop(self, event):
		from pygui.window import ConfirmWindow
		ConfirmWindow(_('Remove item(s) from playlist?'), confirm_action=self._do_delete).show()
		return True



class FavoriteEditorEventHandler(PlaylistEditorEventHandler):
	__doc__ = "Event handler for the TV favorite editor. Toggling is more or less\n    messed up there, so it's disabled for the time being.\n\n    The Select button doesn't do anything here either.\n    "
	def event_toggle_menu(self, event):
		return True

	def event_select(self, event):
		return True



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb773f52c>}
from __future__ import absolute_import
from .core import MenuEventHandler
from pygui.shared import pygui_globs
class PlaylistEditorEventHandler(MenuEventHandler):
	def event_right(self, event):
		self.player.choices.edited = True
		return True

	def event_left(self, event):
		if self.player.choices.edited:
			self.player.choices.edited = False
		else:
			pygui_globs['menustack'].back_one_menu()
		return True

	def event_action_menu(self, event):
		self.player.choices.edited = False
		pygui_globs['menustack'].back_one_menu()
		return True

	def _do_delete(self):
		play = self.player
		play.choices.edited = False
		play.selected.vfs_delete()
		del play.choices[play.selected_pos]
		return True

	def event_stop(self, event):
		from pygui.window import ConfirmWindow
		ConfirmWindow(_('Remove item(s) from playlist?'), confirm_action=self._do_delete).show()
		return True



class FavoriteEditorEventHandler(PlaylistEditorEventHandler):
	__doc__ = "Event handler for the TV favorite editor. Toggling is more or less\n    messed up there, so it's disabled for the time being.\n\n    The Select button doesn't do anything here either.\n    "
	def event_toggle_menu(self, event):
		return True

	def event_select(self, event):
		return True



